import React from 'react';
import { inject, observer } from 'mobx-react';
import { Button } from "antd";

import { WeaLocaleProvider, WeaDialog} from 'ecCom';

import {Condition,CardCondition} from '../list/listCondition';
import {Text} from '../util/text';
const text = new Text();
const getLabel = WeaLocaleProvider.getLabel;

@observer
class ReportInfoDialog extends React.Component {

    render() {
        const { store,store:{status,setState,form,condition,saveReportForm} } = this.props;
        const {visible} = status;
        return (
            <div>
                <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@4qlacv`}
                    className="wea-govern-info-card"
                    icon="icon-coms-government"
                    iconBgcolor='#f14a2d'
                    title={text.REPORTINFO}
                    visible={visible}
                    hasScroll={true}
                    style={{ width: 1000, height: 650 }}
                    onCancel={() => setState({ visible: false }) }
                    buttons={[(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@fxzro9@saveReportForm`} type="primary"  onClick={() => saveReportForm() }>{text.SURE}</Button>),
                        (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@fqj4qn@CANCEL`} type="ghost" onClick ={() => setState({ visible: false }) }>{text.CANCEL}</Button>)
                    ]}
                    >
                    <div style={{marginLeft:'50px'}}><CardCondition ecId={`${this && this.props && this.props.ecId || ''}_CardCondition@lr5iha`} form={form} condition={condition}></CardCondition></div>
                </WeaDialog>
            </div>
        )
    }

}

export {ReportInfoDialog};